package com.yuandian.management.mapper;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuandian.api.management.entity.ConfBusiness;
import com.yuandian.api.management.entity.ConfResource;
import com.yuandian.api.management.entity.ConfSystem;
import com.yuandian.management.vo.ExcelBatch;
import com.yuandian.management.vo.ExcelBusiness;
import com.yuandian.management.vo.ExcelStep;
import com.yuandian.management.vo.ImportBusinessResultVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 导入业务查询mapper
 *
 * @author fucx
 * @date   2020/08/28
 */
@Mapper
public interface ExcelBusinessMapper {





    /**
     *
     * 批量插入业务信息
     */
    void addAll(List<ExcelBusiness> excelBusinessList);


    /**
     * 根据流水号查询全部信息
     * @param dataNumber 流水号
     * @return
     */
    List<ExcelBusiness> selectAllByDataNumber(@Param("dataNumber")String dataNumber);

    /**
     * 根据流水号查询全部信息
     * @param dataNumber 流水号
     * @return
     */
    List<ExcelBusiness> timerSelectAllByDataNumber(@Param("dataNumber")String dataNumber);


    /**
     * 更新业务
     * @param business
     * @return
     */
    int updateExcelBusinessById(ExcelBusiness business);

	/**
	 *
	 * 查询业务信息
	 */
	Page<ExcelBusiness> queryBusinessPageByDataNumber(Page<ExcelBusiness> page,@Param("params") ImportBusinessResultVo business);


//	1、查出未完成导入的流水
    List<ExcelBatch> queryNoFinishBatch();

	List<ExcelStep> selectAllStepByDataNumber(String dataNumber);

	List<ConfSystem> selectSystemByName(List<String> list);

	List<ConfBusiness> selectBusinessByName(@Param("list") List<String> nameList);

	List<ConfResource> selectResourceByName(@Param("list") List<String> nameList);
}